package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ResDishCategoryMapper;
import com.ruoyi.system.domain.ResDishCategory;
import com.ruoyi.system.service.IResDishCategoryService;

/**
 * 餐馆菜品分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-02
 */
@Service
public class ResDishCategoryServiceImpl implements IResDishCategoryService 
{
    @Autowired
    private ResDishCategoryMapper resDishCategoryMapper;

    /**
     * 查询餐馆菜品分类
     * 
     * @param dishCategoryId 餐馆菜品分类主键
     * @return 餐馆菜品分类
     */
    @Override
    public ResDishCategory selectResDishCategoryByDishCategoryId(Long dishCategoryId)
    {
        return resDishCategoryMapper.selectResDishCategoryByDishCategoryId(dishCategoryId);
    }

    /**
     * 查询餐馆菜品分类列表
     * 
     * @param resDishCategory 餐馆菜品分类
     * @return 餐馆菜品分类
     */
    @Override
    public List<ResDishCategory> selectResDishCategoryList(ResDishCategory resDishCategory)
    {
        return resDishCategoryMapper.selectResDishCategoryList(resDishCategory);
    }

    /**
     * 新增餐馆菜品分类
     * 
     * @param resDishCategory 餐馆菜品分类
     * @return 结果
     */
    @Override
    public int insertResDishCategory(ResDishCategory resDishCategory)
    {
        return resDishCategoryMapper.insertResDishCategory(resDishCategory);
    }

    /**
     * 修改餐馆菜品分类
     * 
     * @param resDishCategory 餐馆菜品分类
     * @return 结果
     */
    @Override
    public int updateResDishCategory(ResDishCategory resDishCategory)
    {
        return resDishCategoryMapper.updateResDishCategory(resDishCategory);
    }

    /**
     * 批量删除餐馆菜品分类
     * 
     * @param dishCategoryIds 需要删除的餐馆菜品分类主键
     * @return 结果
     */
    @Override
    public int deleteResDishCategoryByDishCategoryIds(Long[] dishCategoryIds)
    {
        return resDishCategoryMapper.deleteResDishCategoryByDishCategoryIds(dishCategoryIds);
    }

    /**
     * 删除餐馆菜品分类信息
     * 
     * @param dishCategoryId 餐馆菜品分类主键
     * @return 结果
     */
    @Override
    public int deleteResDishCategoryByDishCategoryId(Long dishCategoryId)
    {
        return resDishCategoryMapper.deleteResDishCategoryByDishCategoryId(dishCategoryId);
    }
}
